 /**
  * 设置token
  * @param token
  * @returns
  */
 export const setToken = (token) => window.localStorage.setItem("auth_token", token);

 /**
  * 获取token
  * @returns
  */
export const getToken = () => window.localStorage.getItem("auth_token");
 /**
  * 获取token
  * @returns
  */
export const removeToken = () => window.localStorage.removeItem("auth_token");


  /**
  * 设置user
  * @param user
  * @returns
  */
export const setUser = (user) =>
     window.localStorage.setItem("auth_user", JSON.stringify(user));
 /**
  * 获取user
  * @returns
  */
export const getUser = () => {
    let user = window.localStorage.getItem("auth_user");
    if(user){
        return JSON.parse(user);
    }
    return undefined;
};
 /**
  * 获取user
  * @returns
  */
export const removeUser = () => window.localStorage.removeItem("auth_user");

